<template>
  <div>
    <input type="text" :value="value" @input="onInput" />
    <p>这是子组件显示的值：{{value}}</p>
    <button @click="handleBtn">显示pdf</button>
    <pdf
        ref="pdf"
        :src="url">
    </pdf>
  </div>
</template>
<script>
import pdf from 'vue-pdf'
export default {
  props: ['value'],
  components:{
    pdf
  },
  data () {
    return {
      url: ''
    }
  },
  methods: {
    onInput (e) {
      this.$emit('input', e.target.value);
    },
    handleBtn () {
      this.url = 'https://mastersaas.youxinsign.com:15081/e05-bee-organ/file/download?msa_platform=E05-BEE-ORGAN-WEB&url=/dev/upload/common/8e6b3ec15f0a4e6891134c1542ebcf1e.pdf&name=%E6%96%B0%E5%BB%BA%20DOCX%20%E6%96%87%E6%A1%A3.pdf';
    }
  }
}
</script>
